package com.young.design.pattern.bridge.demo;

public abstract class Phone {
    private Brand brand;

    public Phone(Brand brand) {
        this.brand = brand;
    }

    //定义手机功能，调用品牌的具体实现
    //注意该方法应该定义为protected，因为该方法还没有完成，还需要子类的填充，所以不能被调用
    protected void call() {
        brand.action();
    }
}


class FolderPhone extends Phone{

    public FolderPhone(Brand brand) {
        super(brand);
    }

    @Override
    protected void call() {
        super.call();
        System.out.println("添加了折叠手机的功能");
    }
}
